<script type="text/javascript" language="javascript" src="<?php echo base_url('assets/js/contacts.js'); ?>"></script>
<div class="container-crm">
    <div class="row pull-left">
        <div class="col-md-5">
            
            <div class="btn-group" style="margin-bottom: 5px">
                <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                    Thao tác <span class="caret"></span>
                </button>
                <ul class="dropdown-menu" role="menu">
                    <li><a href="<?php echo base_url('contacts/add')?>">Thêm mới đối tác</a></li>
                    <li class="divider"></li>
                    <li><a href="#">Nhập liệu từ file excel</a></li>
                    <li class="divider"></li>
                    <li><a href="#">Xuất dữ liệu</a></li>
                    <li class="divider"></li>
                    
                </ul>
            </div>
        </div>

    </div>
    <div class="row navbar-template text-center">
        <div class="col-md-12">
            <table id="list_contacts" class="table table-striped table-bordered table-hover" cellspacing="0" width="100%">
                <thead>
                    <tr>
                        <th>Mã khách hàng</th>
                        <th>Tên khách hàng</th>
                        <th>Số đt</th>
                        <th>Tổng bán</th>
                        <th>Nợ cần thu hiện tại</th>

                    </tr>
                </thead>
                <tbody>
                    <?php
                    if ($all_contacts) {
                        foreach ($all_contacts as $contact) {
                            ?>
                            <tr>
                                <td><?php echo $contact->contact_code; ?></td>
                                <td><?php echo $contact->first_name.' '.$contact->last_name ?></td>
                                <td><?php echo $contact->phone ?></td>
                                <td></td>
                                <td></td>

                            </tr>
                            <?php
                        }
                    }
                    ?>

                </tbody>
            </table>
        </div>


    </div>
</div>

